package com.pj.common.base.topbar

import android.os.Bundle
import androidx.recyclerview.widget.RecyclerView
import com.pj.common.R
import com.pj.common.annotation.LayoutParam
import com.pj.common.base.BaseViewModel
import com.pj.common.base.IPullRecyclerLayout
import com.pj.common.databinding.LayoutPullRecyclerviewBinding
import com.pj.common.utils.CommonUtils
import com.qmuiteam.qmui.recyclerView.QMUIRVDraggableScrollBar
import com.qmuiteam.qmui.widget.pullLayout.QMUIPullLayout

open class BaseTopbarRecyclerActivity<VM : BaseViewModel> :
    BaseTopBarActivity<VM, LayoutPullRecyclerviewBinding>(),IPullRecyclerLayout {
    override fun getContentLayout(): Int? {
        return R.layout.layout_pull_recyclerview
    }

    override fun initData(savedInstanceState: Bundle?) {
        super.initData(savedInstanceState)
        setup(mCBinding)
        subscribeMultiRefreshUi(mViewModel,mCBinding,this)
    }

    var mPullToRefresh = false
    override fun loadData(pullToRefresh: Boolean) {
        super.loadData(pullToRefresh)
        mPullToRefresh = pullToRefresh
    }

}